<template>
  <div class="recommend">
    <div class="title">
      <div class="tit">今日特价</div>
      <!-- <div class="link">
        <a href="#">热门</a>
        <a href="#">人气</a>
        <a href="#">销售最多</a>
      </div> -->
      <div class="more">
        <a @click="$router.push({ name: 'ActionLowprice' })"
          >更多<icon name="iconxiangyou" size="16"
        /></a>
      </div>
    </div>
    <div class="recommend-box">
      <div
        class="ad"
        :style="{
          backgroundImage: 'url(' + data.head_img + ')',
          backgroundColor: data.background_color,
        }"
      ></div>
      <div class="goods-list">
        <goods-item1
          v-for="(item, index) in data.specialoffer"
          :key="index"
          :goods="item"
        />
      </div>
    </div>
  </div>
</template>

<script>
import GoodsItem1 from "@/components/GoodsItem/GoodsItem1.vue";
export default {
  name: "Recommend",
  components: { GoodsItem1 },
  props: {
    data: Object,
  },
};
</script>

<style lang="scss" scoped>
.recommend {
  max-width: 1200px;
  margin: 60px auto 20px;
  .title {
    height: 33px;
    display: flex;
    align-items: flex-end;
    .tit {
      font-size: 24px;
      font-weight: 600;
      color: #333333;
      line-height: 33px;
      padding-right: 40px;
    }
    .link {
      a {
        cursor: pointer;
        font-size: 16px;
        font-weight: 400;
        color: #333333;
        line-height: 22px;
        text-decoration: none;
        margin-right: 16px;
        &:hover {
          color: #d52c1a;
        }
      }
    }
    .more {
      flex: 1;
      text-align: right;
      a {
        text-decoration: none;
        font-size: 16px;
        font-weight: 400;
        color: #333333;
        line-height: 22px;
      }
    }
  }
  .recommend-box {
    margin-top: 26px;
    display: flex;
    .ad {
      width: 224px;
      height: 814px;
      background-size: 100% 100%;
    }
    .goods-list {
      flex: 1;
      font-size: 0;
    }
  }
}
</style>
